<template>
	<view>
		<stop isBack>
			<view slot="content">发布信息</view>
		</stop>
		<view class="pad5 bcf">
			<textarea class="round3 w100" maxlength="-1"  v-model="text"  placeholder="您想发表点什么？"
			auto-height style="min-height: 30vw;"></textarea>
		</view>
		<view class="bcf bdtso">
			<spics label="图片" placeholder="给内容加点料" v-model="pics"></spics>
		</view>
		<view class="bcf pad3">
			<view class="cu-btn line-green tac w100 lg round" @tap="submit">
				发布
				<ripple></ripple>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				text:'',
				pics:[]
			}
		},
		methods: {
			submit(){
				this.$api.post('/api/zones',{
					text:this.text,
					pics:this.pics
				},res=>{
					this.log(res)
					if(res.s == 1){
						this.$win.goback()
					}else{
						this.$com.showToast(res.i)
					}
				})
			}
		}
	}
</script>

<style>

</style>
